package cn.itsource.autoconfig;

import cn.itsource.config.GatewayRedisConfig;
import cn.itsource.config.GatewaySaTokenConfigure;
import cn.itsource.config.GatewayStpInterfaceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.data.redis.core.RedisTemplate;

/**
 * 📖：beishan
 * 🗓️：2024/4/1 17:44
 * =====================
 *
 * 网关拦截的自动配置 ---存在 bug
 */
@Configuration
@Import({GatewayRedisConfig.class, GatewaySaTokenConfigure.class})
public class GatewayAutoconfig {
    @Bean
    public GatewayStpInterfaceImpl GatewayStpInterfaceImpl(RedisTemplate<String, Object> redisTemplate) {
        return new GatewayStpInterfaceImpl(redisTemplate);
    }

}
